const baseUrl = "192.168.1.102:8765";
import {
	getState
} from "./util";
const isSSL = false;

export function getBasicUrl() {
	if (isSSL)
		return "https://" + baseUrl;
	return "http://" + baseUrl;
}

export function getHttpUrl() {
	if (isSSL)
		return "https://" + baseUrl;
	return "http://" + baseUrl;
}
export function getWsUrl() {
	var wsUrl = baseUrl + "/ws/mcenter?appClient=colorsexapp";
	var authHeader = getState();
	if (authHeader !== undefined && authHeader !== null && authHeader.length > 0)
		wsUrl = wsUrl + "&token=" + authHeader;
	if (isSSL)
		return "wss://" + wsUrl;
	return "ws://" + wsUrl
}
